﻿namespace WoWArmoryParser
{
    public class Item
    {

        protected int _ID;
        protected int _Level;
        protected QualityEnum _Quality;
        protected string _Name;
        protected string _Icon;
        protected bool _IsValid = false;

        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        public int Level
        {
            get { return _Level; }
            set { _Level = value; }
        }

        public QualityEnum Quality
        {
            get { return _Quality; }
            set { _Quality = value; }
        }

        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        public string Icon
        {
            get { return _Icon; }
            set { _Icon = value; }
        }

        public bool IsValid
        {
            get { return _IsValid; }
            set { _IsValid = value; }
        }

        public Uri ExtraLargeIconWebPath()
        {
            return new Uri(string.Format("{1}/images/icons/64x64/{0}.jpg", _Icon, ArmoryParser.GetRegionPath(RegionEnum.USA)));
        }

        public Uri LargeIconWebPath()
        {
            return new Uri(string.Format("{1}/images/icons/43x43/{0}.png", _Icon, ArmoryParser.GetRegionPath(RegionEnum.USA)));
        }

        public Uri SmallIconWebPath()
        {
            return new Uri(string.Format("{1}/images/icons/21x21/{0}.png", _Icon, ArmoryParser.GetRegionPath(RegionEnum.USA)));
        }

        public Uri ItemWebLink()
        {
            return new Uri(string.Format("{1}/item-info.xml?i={0}", _ID, ArmoryParser.GetRegionPath(RegionEnum.USA)));
        }
    }
}
